//
//  WFEatHeadCollectionViewCell.m
//  WeiFang
//
//  Created by WeiFang on 2016/11/21.
//  Copyright © 2020年 WeiFang. All rights reserved.
//

#import "WFEatHeadCollectionViewCell.h"

@implementation WFEatHeadCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
    [super awakeFromNib];
}

- (void)setData:(id)data delegate:(id)delegate {

    if ([data isKindOfClass:[NSDictionary class]]) {
        if ([data[@"data"] isKindOfClass:[WFEatHeadCollectionViewCellModel class]]) {
            WFEatHeadCollectionViewCellModel *model = data[@"data"];
            _titleLabel.text = model.title;
        }
    }
}

@end




#pragma mark - Model

@implementation WFEatHeadCollectionViewCellModel

+ (WFEatHeadCollectionViewCellModel *)ittemModelWithTitle:(NSString *)title {
    WFEatHeadCollectionViewCellModel *model = [WFEatHeadCollectionViewCellModel new];
    model.title = kSafeString(title);
    return model;
}

@end
